package com.ruibang.glass.produce.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.tools.LocalDateStringConverter;
import com.teaming.cloud.framework2.common.tools.LocalDateTimeStringConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-03-11  11:28
 * @Description: TODO：生产-配料-主配料记录实体
 * @Version: 1.0
 */

@Data
@ApiModel
@TableName(value = "charge_mix_main_ingredients")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public class MainIngredientsRecord {
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelIgnore
    private String id;

    @ApiModelProperty(value = "日期")
    @ColumnWidth(12)
    @ExcelProperty(value = {"日期"}, index = 0, converter = LocalDateStringConverter.class)
    @TableField("mian_in_date")
    private LocalDate date;

    @ApiModelProperty(value = "作业序号")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业序号"}, index = 1)
    private Integer jobNumber;

    @ApiModelProperty(value = "料方号")
    @ColumnWidth(10)
    @ExcelProperty(value = {"料方号"}, index = 2)
    @TableField("material_number")
    private String materialCode;

    @ApiModelProperty("产线")
    @ColumnWidth(10)
    @ExcelProperty(value = {"产线"}, index = 3)
    private String productionLine;

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(18)
    @ExcelProperty(value = {"开始时间"}, index = 4, converter = LocalDateTimeStringConverter.class)
    private LocalDateTime startTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(18)
    @ExcelProperty(value = {"开始时间"}, index = 5, converter = LocalDateTimeStringConverter.class)
    @TableField("complete_time")
    private LocalDateTime endTime;

    @ApiModelProperty("作业日志")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业日志"}, index = 6)
    private String jobLog;

    @ApiModelProperty("作业负责人")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业负责人"}, index = 7)
    @TableField("job_person")
    private String jobManager;

    @ApiModelProperty("作业负责人用户ID")
    @ExcelIgnore
    @TableField(exist = false)
    private String jobManagerId;

    @ApiModelProperty("复核人")
    @ColumnWidth(10)
    @ExcelProperty(value = {"复核人"}, index = 8)
    @TableField("job_checker")
    private String reviewer;

    @ApiModelProperty("复核人用户ID")
    @ExcelIgnore
    @TableField(exist = false)
    private String reviewerId;

    @ApiModelProperty("料罐号")
    @ColumnWidth(10)
    @ExcelProperty(value = {"料罐号"}, index = 9)
    private String tankNumber;

    @ApiModelProperty("混合机")
    @ColumnWidth(10)
    @ExcelProperty(value = {"混合机"}, index = 10)
    @TableField("mix_bin")
    private String mixer;


    /**
     * 重量
     */
    @ApiModelProperty("总重")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "总重"}, index = 11)
    @TableField("batch_actual_value")
    private Double headTotalWeight;
    @ApiModelProperty("A重量")
    @TableField("a_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "A重量"}, index = 12)
    private Double aWeight;
    @ApiModelProperty("B重量")
    @TableField("b_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "B重量"}, index = 13)
    private Double bWeight;
    @ApiModelProperty("C重量")
    @TableField("c_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "C重量"}, index = 14)
    private Double cWeight;
    @ApiModelProperty("D重量")
    @TableField("d_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "D重量"}, index = 15)
    private Double dWeight;
    @ApiModelProperty("E重量")
    @TableField("e_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "E重量"}, index = 16)
    private Double eWeight;
    @ApiModelProperty("F重量")
    @TableField("f_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "F重量"}, index = 17)
    private Double fWeight;
    @ApiModelProperty("G重量")
    @TableField("g_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "G重量"}, index = 18)
    private Double gWeight;
    @ApiModelProperty("H重量")
    @TableField("h_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "H重量"}, index = 19)
    private Double hWeight;
    @ApiModelProperty("I重量")
    @TableField("i_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "I重量"}, index = 20)
    private Double iWeight;
    @ApiModelProperty("J重量")
    @TableField("j_weight_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重值(kg)", "J重量"}, index = 21)
    private Double jWeight;

    /**
     * 设定重量
     */
    @ApiModelProperty("总量(设定重量(kg))")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "总重"}, index = 22)
    @TableField("batch_weigh_value")
    private Double setTotalWeight;
    @TableField("a_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "A重量"}, index = 23)
    private Double aSetWeight;
    @TableField("b_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "B重量"}, index = 24)
    private Double bSetWeight;
    @TableField("c_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "C重量"}, index = 25)
    private Double cSetWeight;
    @TableField("d_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "D重量"}, index = 26)
    private Double dSetWeight;
    @TableField("e_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "E重量"}, index = 27)
    private Double eSetWeight;
    @TableField("f_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "F重量"}, index = 28)
    private Double fSetWeight;
    @TableField("g_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "G重量"}, index = 29)
    private Double gSetWeight;
    @TableField("h_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "H重量"}, index = 30)
    private Double hSetWeight;
    @TableField("i_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "I重量"}, index = 31)
    private Double iSetWeight;
    @TableField("j_weight_set")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "J重量"}, index = 32)
    private Double jSetWeight;


    /**
     * 称量误差值
     */
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "总重"}, index = 33)
    @TableField("total_weight_error_value")
    private Double errorTotalWeight;
    @TableField("a_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "A重量"}, index = 34)
    private Double aErrorWeight;
    @TableField("b_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "B重量"}, index = 35)
    private Double bErrorWeight;
    @TableField("c_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "C重量"}, index = 36)
    private Double cErrorWeight;
    @TableField("d_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "D重量"}, index = 37)
    private Double dErrorWeight;
    @TableField("e_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "E重量"}, index = 38)
    private Double eErrorWeight;
    @TableField("f_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "F重量"}, index = 39)
    private Double fErrorWeight;
    @TableField("g_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "G重量"}, index = 40)
    private Double gErrorWeight;
    @TableField("h_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "H重量"}, index = 41)
    private Double hErrorWeight;
    @TableField("i_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "I重量"}, index = 42)
    private Double iErrorWeight;
    @TableField("j_weight_error_value")
    @ColumnWidth(10)
    @ExcelProperty(value = {"称重误差值(kg)", "J重量"}, index = 43)
    private Double jErrorWeight;

    @ApiModelProperty(value = "备注")
    @ExcelIgnore
    private String remark;

    @ApiModelProperty(value = "逻辑删除标识")
    @ExcelIgnore
    private String delFlag;
}
